:root {
  --bithesis-green: 0, 153, 68;
  --vp-c-brand: rgb(var(--bithesis-green));

  --vp-custom-block-tip-text: var(--vp-c-brand);
  --vp-custom-block-tip-border: rgba(var(--bithesis-green), 0.25);
  --vp-custom-block-tip-bg: rgba(var(--bithesis-green), 0.05);

  --vp-button-brand-border: var(--vp-c-brand);
  --vp-button-brand-bg: rgba(var(--bithesis-green), 0.9);
}

#embed-video {
  position: relative;
  padding-top: 66%;
  margin-top: 16px;
  margin-bottom: 16px;
}

#embed-video > iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

img[src^='https://img.shields.io/badge/'],
img.icon {
  display: inline;
  vertical-align: middle;
}
.dark img.icon {
  filter: invert();
}

.vp-doc :is(.vp-external-link-icon, .vp-doc a[href*="://"], .vp-doc a[target="_blank"]):not(:is(.no-icon, svg a, :has(img, svg)))::after
{
  /* 默认图标用于方块字很怪，换成 https://primer.style/octicons/icon/link-external-16/ */
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'%3E%3Cpath d='M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z'%3E%3C/path%3E%3C/svg%3E");
  margin: 2px;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.tag-row {
  padding: 1em 0;

  font-size: 0.8em;

  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;

  a {
    display: inline-block;

    padding: 0.125em 0.75em;
    border-radius: 2em;

    text-decoration: none;
    color: var(--vp-c-brand);
    background-color: var(--vp-custom-block-tip-border);
  }
}

a.wikitext-ish-link > code.pkg {
  --vp-code-bg: none;
  --vp-custom-block-details-code-bg: none;
  padding: 0 0.25em;
}

.vp-doc a {
  text-decoration: none;
}

.vp-doc a:hover {
  text-decoration: underline;
}
